import Cookies from 'js-cookie'

const TokenKey = "API-TOKEN";

export function getToken() {
  return Cookies.get(global.TOKEN_KEY || TokenKey, {domain: global.MAIN_DOMAIN})
}

export function setToken(token) {
  return Cookies.set(global.TOKEN_KEY || TokenKey, token, {domain: global.MAIN_DOMAIN})
}

export function removeToken() {
  return Cookies.remove(global.TOKEN_KEY || TokenKey, {domain: global.MAIN_DOMAIN})
}
